<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
  <head>
    <th:block th:replace="~{/_include/header}" />
    <meta name="page-help" content="https://getrebuild.com/docs/admin/integration#%E4%BA%91%E5%AD%98%E5%82%A8" />
    <title>[[${bundle.L('云存储')}]]</title>
  </head>
  <body>
    <div class="rb-wrapper rb-fixed-sidebar rb-collapsible-sidebar rb-collapsible-sidebar-hide-logo rb-color-header" th:classappend="${sideCollapsedClazz}">
      <th:block th:replace="~{/_include/nav-top}" />
      <th:block th:replace="~{/_include/nav-left-admin(active='integration-storage')}" />
      <div class="rb-content">
        <div class="main-content container-fluid syscfg">
          <div class="row">
            <div class="col-lg-9 col-12">
              <div class="card">
                <div class="card-header pb-1">
                  [[${bundle.L('云存储')}]]
                  <a href="###" class="float-right J_edit"><i class="icon zmdi zmdi-edit"></i> [[${bundle.L('修改')}]]</a>
                  <a href="###" class="float-right J_save hide"><i class="icon zmdi zmdi-check text-bold"></i> [[${bundle.L('保存')}]]</a>
                </div>
                <div class="card-body">
                  <h5>[[${bundle.L('七牛云 QINIU')}]]</h5>
                  <table class="table">
                    <tbody>
                      <tr>
                        <td width="40%">[[${bundle.L('访问域名')}]]</td>
                        <td data-id="StorageURL" th:data-value="${storageAccount == null ? '' : storageAccount[3]}">[[${storageAccount == null ? bundle.L('未设置') : storageAccount[3]}]]</td>
                      </tr>
                      <tr>
                        <td>[[${bundle.L('存储空间')}]]</td>
                        <td data-id="StorageBucket" th:data-value="${storageAccount == null ? '' : storageAccount[2]}" th:data-form-text="${bundle.L('存储空间变更需你自行迁移原有数据')}">
                          [[${storageAccount == null ? bundle.L('未设置') : storageAccount[2]}]]
                        </td>
                      </tr>
                      <tr>
                        <td>[[${bundle.L('密钥 AK')}]]</td>
                        <td data-id="StorageApiKey" th:data-value="${storageAccount == null ? '' : storageAccount[0]}">[[${storageAccount == null ? bundle.L('未设置') : storageAccount[0]}]]</td>
                      </tr>
                      <tr>
                        <td>[[${bundle.L('密钥 SK')}]]</td>
                        <td data-id="StorageApiSecret" th:data-value="${storageAccount == null ? '' : storageAccount[1]}">[[${storageAccount == null ? bundle.L('未设置') : storageAccount[1]}]]</td>
                      </tr>
                    </tbody>
                  </table>
                  <div th:if="${!_StorageCloud}" class="alert alert-warning alert-icon mt-6">
                    <div class="icon"><span class="mdi mdi-database-check-outline"></span></div>
                    <div class="message">[[${bundle.L('七牛云存储账户未配置或配置有误，当前已启用本地文件存储')}]]</div>
                  </div>
                  <div class="edit-footer">
                    <button class="btn btn-link" type="button">[[${bundle.L('取消')}]]</button>
                    <button class="btn btn-primary" type="button">[[${bundle.L('保存')}]]</button>
                  </div>
                </div>
              </div>
            </div>
            <div class="col-lg-3 col-12 col-right-compact">
              <div class="card">
                <div class="card-header card-header-divider">[[${bundle.L('存储大小')}]]</div>
                <div class="card-body">
                  <strong class="fs-16">[[${_StorageSize}]]</strong>
                  ([[${_StorageCloud ? bundle.L('七牛云 QINIU') : bundle.L('本地存储')}]])
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <th:block th:replace="~{/_include/footer}" />
    <script th:src="@{/assets/js/admin/syscfg.js}" type="text/babel"></script>
  </body>
</html>
